<html>
<head>
<title>My Form</title>
<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>public/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>public/css/bootstrap-theme.min.css">
<script type="text/javascript" src="<?php echo base_url();?>public/js/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>public/js/jquery.upload.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>public/css/style.css">
</head>
<body>
<?php	$this->load->view('admin/admin_nav'); ?>
<div class="container">
	<h3>分类<small>列表</small><a class="pull-right btn btn-success btn-sm" href="<?php echo site_url('/admin/Catalog/add') ?>">添加</a></h3>
	<table class="table table-striped table-bordered " cellpadding="0" cellspacing="0" >
		<tr>
			<th >id</th>
			<th >name</th>
			<th width="150px">操作</th>
		</tr>
		<?php foreach ($catalogs as $value) { ?>
		<tr>
			<td class="is1"><?php echo $value->id;?></td>
			<td class="is2"><?php echo $value->name?></td>
			<td class="is3">
				<a class="btn btn-primary btn-sm"  href="<?php echo site_url('/admin/Catalog/edit/'.$value->id) ?>">修改</a>
				<a class="del btn btn-danger btn-sm del"  href="<?php echo site_url('/admin/Catalog/del/'.$value->id) ?>">删除</a>
			</td>
		</tr>
		<?php } ?>
	</table>
</div>
<script src="<?php echo base_url();?>public/js/bootstrap.min.js"></script>
<script type="text/javascript">
	$(".del").click(function(){
		if(!confirm('你确定要删除这条数据吗？')){
				return false;
			}
	})
</script>
</body>
</html>